package com.dormitory_springboot.controller;

import com.dormitory_springboot.bean.Word;
import com.dormitory_springboot.service.WordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @auther 夏杨
 **/
@RestController
@RequestMapping("/word")
public class WordController {

    @Autowired
    WordService wordService;

    @GetMapping("/getWords")
    public List<Word> getWords(){
        return wordService.list();
    }
}
